<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" session="false" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
	<title>내선번호선택</title>
	<link rel="stylesheet" type="text/css" href="/mongo/resources/inc/css/common.css">
	<script type="text/javascript" src="/mongo/resources/inc/js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript">
	<!--
		var dataJSON = {};
		
		$(document).ready( function(){
			initialize();
			
			$('input[type=button]').click(function(){
				location.href = "/mongo/contact/"+$(this).attr("userId")+"/"+$(this).attr("extNo");
			});
		});
		
		function initialize(){
			$("#users").empty();
			<c:forEach var="datas" items="${users}">
				$("#users").append(displayUsers(${datas}));
			</c:forEach>
		}
		
		function displayUsers(datas) {
			r = 
				"<p>"
				+ "<input type='button' extNo='"+datas.extNo+"' userId='"+datas.userId+"' value='"+datas.name + datas.extNo+"' />"
				+ "</p>";
				
			return r;
		}
	-->
	</script>
</head>
<body>
<P>  The time on the server is ${serverTime}. </P>
<p>내선번호선택</p>
<div id="users"></div>
</body>
</html>
